package com.jcli.inputAndoutput;
import java.io.*;
import java.util.Properties;

public class Demo01 {
    public static void main(String[] args) throws IOException {
        // 设置默认编码为UTF-8
        System.setProperty("file.encoding", "UTF-8");

        Properties properties = new Properties();
        InputStream inputStream = Demo01.class.getResourceAsStream("/config.properties");
        // BufferedReader bf = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); // 指定UTF-8编码
        // properties.load(bf);
        InputStreamReader reader = new InputStreamReader(inputStream, "UTF-8"); // 指定UTF-8编码
        properties.load(reader);
        System.out.println(properties.getProperty("China"));
    }
}
